package com.oscarmovie.model;

import java.util.Set;

public class Award {
	private int id;
	private String name;
	private String nameCn;
	private String alias;
	private String description;
	private String displayName;
	private Set<Mpac> mpacs;
	
	
	public String getDisplayName() {
		if (displayName == null) {
			displayName = nameCn;
			
		}
		return displayName;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getNameCn() {
		return nameCn;
	}
	public void setNameCn(String nameCn) {
		this.nameCn = nameCn;
	}
	public String getAlias() {
		return alias;
	}
	public void setAlias(String alias) {
		this.alias = alias;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public void setMpacs(Set<Mpac> mpacs) {
		this.mpacs = mpacs;
	}
	public Set<Mpac> getMpacs() {
		return mpacs;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		return result;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!getClass().isAssignableFrom( obj.getClass()))
			return false;
		Award other = (Award) obj;
		if (getId() != other.getId())
			return false;
		return true;
	}
	
	
	
	
}
